package ModelLayer;

import java.util.ArrayList;
public class Invoice 

{
	private int invoiceId;
	private String paymentDate;
	private double totalPrice;
	private Employee employee;
	private ArrayList<SalesOrder> salesOrders;
	
	//Constructor which takes; invoiceId, payment date, total price and employee as a parameter
	public Invoice(int invoiceId, String paymentDate, double totalPrice, Employee employee)
	{
		this.invoiceId = invoiceId;
		this.paymentDate = paymentDate;
		this.totalPrice = totalPrice;
		this.employee = employee;
		salesOrders = new ArrayList<SalesOrder>();
	}
	
	//Empty constructor
	public Invoice()
	{
		
	}
	
	//Adds a sales order
	public void addSalesOrder(SalesOrder salesOrder)
	{
		salesOrders.add(salesOrder);
	}
	
	//Adds a sales order array
	public void addSalesOrderArray(ArrayList<SalesOrder> saleOrder)
	{
		salesOrders = saleOrder;
	}
	
	//Returns the invoice ID
	public int getInvoiceId() 
	{
		return invoiceId;
	}

	//Sets the invoice ID
	public void setInvoiceId(int invoiceId) 
	{
		this.invoiceId = invoiceId;
	}

	//Returns the payment date
	public String getPaymentDate() 
	{
		return paymentDate;
	}

	//Sets the payment date
	public void setPaymentDate(String paymentDate) 
	{
		this.paymentDate = paymentDate;
	}

	//Returns total price
	public double getTotalPrice() 
	{
		return totalPrice;
	}

	//Sets total price
	public void setTotalPrice(double totalPrice) 
	{
		this.totalPrice = totalPrice;
	}
	
	//Returns employee
	public Employee getEmployee()
	{
		return employee;
	}
	
	//Sets the employee
	public void setEmployee(Employee employee)
	{
		this.employee = employee;
	}

}
